<?php
class Newsletter extends Doctrine_Record {
    public function setTableDefinition() {
        $this->setTableName('newsletter');
        $this->hasColumn('email','string',100);
        $this->hasColumn('descargado','integer',1, array('default'=>0));
    }
    
    public static function selectAll($filtro='%') {
        $q = Doctrine_Query::create()
            ->select('n.*')
            ->from('newsletter n')
            ->where('n.descargado like ? ', $filtro);
        return $q->execute();
    }
}
?>